import request from '@/utils/request'

// 获取工单信息
export function getworkorder(data) {
	return request({
		url: `/api/Business/workorder`,
		method: 'get',
		data,
		options: {
			load: false
		}
	})
}

//详情
export function getworkorderbyid(id) {
	return request({
		url: `/api/Business/workorder/${id}`,
		method: 'get',
		options: {
			load: false
		}
	})
}

//报工
export function createWorkReport(data) {
	return request({
		url: `/api/Business/Workreport`,
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//完工
export function finishWorkorder(id) {
	return request({
		url: `/api/Business/Workorder/Finish/${id}`,
		method: 'post',
		options: {
			load: false
		}
	})
}
// 获取报工信息
export function getworkreport(data) {
	return request({
		url: `/api/Business/Workreport`,
		method: 'get',
		data,
		options: {
			load: false
		}
	})
}

//删除
export function deleteWorkReport(id){
	return request({
		url:'/api/Business/Workreport/'+id,
		method:'delete'
	})
}

// 获取当前用户
export function getUserList(data) {
	return request({
		url: `/api/permission/users/GetUserList`,
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}


